package com.pacific.sign.dal.dao.oaSchema.custom;

import com.pacific.sign.model.po.oaSchema.view.OdePartmentVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by 1 on 2017/7/19.
 */
public interface InterfaceOdepartmentCustom {

    /**
     * 查询部门
     */
    @Select("SELECT t.TITLE as title, t.ADMINID as adminid FROM interface_odepartment t WHERE DEPCODE = #{depCode}")
    OdePartmentVo queryDepartment(@Param("depCode") String depCode);

    /**
     * 查询下级部门
     */
    @Select("SELECT t.DEPCODE from interface_odepartment t where adminid = #{depCode}")
    List<OdePartmentVo> queryNextDepartment(@Param("depCode") String depCode);

}
